//点击ul的li进行切换
function clickChange(){
    const ul = document.getElementById("ul1")
    const ol = document.getElementById("ol1")
    ul.onclick = function(e){
        e = e || window.event
        for(let i = 0;i < ul.children.length;i++){
            ul.children[i].classList.remove("active")
            ul.children[i].dataset.index = i
            ol.children[i].classList.remove("active")
        }
        e.target.classList.add("active")
        ol.children[+e.target.dataset.index].classList.add("active")

    }
}
clickChange()
